package com.auleev.poo.abstraction;

public class Salary extends Employee {

	private double salary; 
	public Salary(String name, String addres, int number, double salary) {
		super(name, addres, number);
		setSalary(salary);
	
	}
	public double getSalary() {
		return salary;
	}
	  public void setSalary(double newSalary)
	   {
	       if(newSalary >= 0.0)
	       {
	          salary = newSalary;
	       }
	   }
	   public double computePay()
	   {
	      System.out.println("Computing salary pay for " + getName());
	      return salary/52;
	   }

}
